Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default root dir (composer install) #2401

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Conversation

sreichel
Copy link
Contributor

Description (*)

Not sure about your workflows, but for developing on OM i run git clone and composer install.

  1. With "magento-root-dir": "root" i get following message ... and an empty root directory.
root/app/Mage.php is not a file.
  1. With "magento-root-dir": "." i get following message ... (existing project)
./app/Mage.php was already patched

Questions or comments

Todo; update readme to provide examples of different usages? (ddev, OM as composer requirement ...)

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)
  • Add yourself to contributors list

@github-actions github-actions bot added the composer Relates to composer.json label Aug 10, 2022
@github-actions

This comment has been minimized.

@fballiano fballiano merged commit 58401cd into 1.9.4.x Aug 11, 2022
@fballiano fballiano deleted the composer-root-dir branch August 11, 2022 07:09
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
7 runs  ±0  5 ✔️ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 58401cd. ± Comparison against base commit 9b656d8.

@addison74
Copy link
Contributor

addison74 commented Aug 11, 2022

When I generated the composer.lock for a PR a few days ago, at the end it asked me about the root directory, see bellow:

magento root dir "root" missing! create now? [Y,n] y
magento root dir "root" created
root/app/Mage.php is not a file.

I answered Yes then I found it created, but it didn't contain anything, just an empty directory. I didn't ask myself any more questions, although the last line clearly shows an issue. I took over this PR and tested it again a few moments ago and here is the result:

buntu@ubuntu-virtual-machine:~/composer/magento-lts$ ls
api.php  composer.json  cron.php  dev     EVENTS.md    get.php   index.php    js   LICENSE_AFL.txt  LICENSE.txt  php.ini.sample  robots.txt.sample  shell  var
app      composer.lock  cron.sh   errors  favicon.ico  includes  install.php  lib  LICENSE.html     media        README.md       SECURITY.md        skin
ubuntu@ubuntu-virtual-machine:~/composer/magento-lts$ rm composer.lock
ubuntu@ubuntu-virtual-machine:~/composer/magento-lts$ composer install
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 17 installs, 0 updates, 0 removals
  - Locking eloquent/enumeration (5.1.1)
  - Locking flyingmana/composer-config-reader (20.0.1)
  - Locking justinrainbow/json-schema (5.2.12)
  - Locking macopedia/phpstan-magento1 (v1.0.4)
  - Locking magento-hackathon/magento-composer-installer (4.0.2)
  - Locking phpstan/phpstan (1.8.2)
  - Locking psr/container (2.0.2)
  - Locking symfony/console (v5.4.11)
  - Locking symfony/deprecation-contracts (v3.1.1)
  - Locking symfony/polyfill-ctype (v1.26.0)
  - Locking symfony/polyfill-intl-grapheme (v1.26.0)
  - Locking symfony/polyfill-intl-normalizer (v1.26.0)
  - Locking symfony/polyfill-mbstring (v1.26.0)
  - Locking symfony/polyfill-php73 (v1.26.0)
  - Locking symfony/polyfill-php80 (v1.26.0)
  - Locking symfony/service-contracts (v3.1.1)
  - Locking symfony/string (v6.1.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 17 installs, 0 updates, 0 removals
  - Installing eloquent/enumeration (5.1.1): Extracting archive
  - Installing justinrainbow/json-schema (5.2.12): Extracting archive
  - Installing symfony/polyfill-mbstring (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-normalizer (v1.26.0): Extracting archive
  - Installing symfony/polyfill-intl-grapheme (v1.26.0): Extracting archive
  - Installing symfony/polyfill-ctype (v1.26.0): Extracting archive
  - Installing symfony/string (v6.1.3): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing symfony/service-contracts (v3.1.1): Extracting archive
  - Installing symfony/polyfill-php80 (v1.26.0): Extracting archive
  - Installing symfony/polyfill-php73 (v1.26.0): Extracting archive
  - Installing symfony/deprecation-contracts (v3.1.1): Extracting archive
  - Installing symfony/console (v5.4.11): Extracting archive
  - Installing flyingmana/composer-config-reader (20.0.1): Extracting archive
  - Installing magento-hackathon/magento-composer-installer (4.0.2): Extracting archive
you may want to add the packages.firegento.com repository to composer.
add it with: composer.phar config -g repositories.firegento composer https://packages.firegento.com
  - Installing phpstan/phpstan (1.8.2): Extracting archive
  - Installing macopedia/phpstan-magento1 (v1.0.4): Extracting archive
9 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
12 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Autoloader patch to ./app/Mage.php was applied successfully

The issue is solved. I wanted to specify this because I initially approved it without providing more details.

sreichel added a commit that referenced this pull request Aug 12, 2022
* Merge PR #2342

* Revert "Add basic text for Ukraine (#2074)" (#2325)

This reverts commit 33dfa26.

* Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract: avoid loading all websites when using only the current one (#2351)

* Added support for HTTP2 to Mage_HTTP_Client_Curl (#1137)

* Blocked access to all dot files (#2349)

* Capitalization Adjustment Regarding CamelCase in Method Names (#2365)

* refactor: Adjusted capitalization of two public methods.

* refactor: Adjusted capitalization of one protected method.

* refactor: Adjusted capitalization of where call.

* chore: Removed fixed error from phpstan baseline.

* Some microoptimization (#2335)

* Avoid duplicate method calls

* Replaced array_push()

* Changed substr() third parameter

* Use array_key_exists()

* php7 opcode - internal functions

* Enclosed error with <pre> tag for prettier error print (if developer mode is enabled). (#2368)

* Updated phpstan to 1.8.2 (#2367)

* Escape product titles in MSRP JavaScript (#2366)

* Product names were not escaped. If contained a double quote, would break the JavaScript for MSRP/MAP

* update contribution list

* Update boxes.css (#2330)

* Force describeTable() to use read DB adapter (#2371)

* Do not install n98/n98_layouthelper (#2373)

* Add apt update to XML validation workflow (#2376)

* Merged PR #2375

* Replace remaining "sizeof" calls with "count" (#2369)

* Remove DISCLAIMER and change Magento -> OpenMage in header (#2297)

* Added label for phpstan cosmetic changes (#2384)

* Added weight to salesOrderShipmentAddTrack API (#1377)

* PHPStan/DOCBlock fixes (#2336)

* Updated docs for email addTo() (#2382)

* Updated phpstan experimental (#2386)

* Cosmetic changes to Mage_Payment_Model_Method_Abstract::validate() (#2388)

* Replaced join() calls with implode() (#2389)

* Hidden empty sub menu from backend (#2391)

* Remove Thumbs.db file (#2394)

* Support PHP 8.1 in composer.json (#2378)

* php condition in composer.json

This solves the issue related to php versions > 8.1

* Reduced condition for PHP requirement

* Changed PHP requirement

* Updated version in Ubuntu 22.04 based on PHP 8.1.2

* Composer.lock updated in Ubuntu 20.04 (PHP 8.1.2)

* Update composer.lock

* Update composer.lock

* Blocked various file types in .htaccess (#2359)

* Color swatches work with disparate product IDs (#2390)

* Move Credit Memo at the end of the buttons list (#2392)

* Version bump (#2387)

* Minor fixes on 'filter_condition_callback' method _filterStoreCondition() (#2362)

* add ReturnTypeWillChange to various Files catched by code style checker #2302

* Phpstan fixes (#2396)

* Fixed addCrumb()

* Fixed initForm() and _needToAddDummy()

* Fixed addLink()

* Fixed addLinkRel()

* Fixed canUseCanonicalTag()

* Fixed getAddUrl...()

* Fixed rollBack() camelCase error reported by phpstan (#2403)

* Changes default root dir in composer.json (#2401)

* Fixed targetNamespace for WS-I Compliant SOAP APIs (#2405)

* Updated phpstan baseline

Co-authored-by: sv3n <[email protected]>
Co-authored-by: Fabian Blechschmidt <[email protected]>
Co-authored-by: Colin Mollenhour <[email protected]>
Co-authored-by: Kevin Jakob <[email protected]>
Co-authored-by: Ng Kiat Siong <[email protected]>
Co-authored-by: Scott Moore <[email protected]>
Co-authored-by: ADDISON <[email protected]>
Co-authored-by: Justin Beaty <[email protected]>
Co-authored-by: luigifab <[email protected]>
Co-authored-by: Daniel Fahlke <[email protected]>
Co-authored-by: leissbua <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer Relates to composer.json
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants